<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>git的常用指令 | Zelma&#39;s Blog</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/logo.png">
    <meta name="description" content="记录，成为更好的自己！">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/assets/css/0.styles.4cf3e643.css" as="style"><link rel="preload" href="/assets/js/app.6bff9ace.js" as="script"><link rel="preload" href="/assets/js/4.4f19eb35.js" as="script"><link rel="preload" href="/assets/js/1.085d100d.js" as="script"><link rel="preload" href="/assets/js/27.d5e7e0d7.js" as="script"><link rel="prefetch" href="/assets/js/10.a9f8c063.js"><link rel="prefetch" href="/assets/js/11.104a9c15.js"><link rel="prefetch" href="/assets/js/12.2b5515f3.js"><link rel="prefetch" href="/assets/js/13.4b350042.js"><link rel="prefetch" href="/assets/js/14.c2117806.js"><link rel="prefetch" href="/assets/js/15.f122a822.js"><link rel="prefetch" href="/assets/js/16.b7b77918.js"><link rel="prefetch" href="/assets/js/17.ca19e9d9.js"><link rel="prefetch" href="/assets/js/18.86eacc78.js"><link rel="prefetch" href="/assets/js/19.a9eff237.js"><link rel="prefetch" href="/assets/js/20.1cc397e3.js"><link rel="prefetch" href="/assets/js/21.543a015c.js"><link rel="prefetch" href="/assets/js/22.319e4a6e.js"><link rel="prefetch" href="/assets/js/23.e60f5f5b.js"><link rel="prefetch" href="/assets/js/24.b3891c01.js"><link rel="prefetch" href="/assets/js/25.ed2e6b36.js"><link rel="prefetch" href="/assets/js/26.40d7e552.js"><link rel="prefetch" href="/assets/js/28.10aa572b.js"><link rel="prefetch" href="/assets/js/29.acf9222c.js"><link rel="prefetch" href="/assets/js/3.74a0f1d8.js"><link rel="prefetch" href="/assets/js/30.ab8bfb83.js"><link rel="prefetch" href="/assets/js/31.36528513.js"><link rel="prefetch" href="/assets/js/32.f582544c.js"><link rel="prefetch" href="/assets/js/33.41a28fb2.js"><link rel="prefetch" href="/assets/js/34.73610167.js"><link rel="prefetch" href="/assets/js/35.f1ec0595.js"><link rel="prefetch" href="/assets/js/36.245a9409.js"><link rel="prefetch" href="/assets/js/37.c96cef21.js"><link rel="prefetch" href="/assets/js/38.ef989ff8.js"><link rel="prefetch" href="/assets/js/39.b6ac0196.js"><link rel="prefetch" href="/assets/js/40.f64953b6.js"><link rel="prefetch" href="/assets/js/5.c1ba3938.js"><link rel="prefetch" href="/assets/js/6.5bb669f5.js"><link rel="prefetch" href="/assets/js/7.0bd32045.js"><link rel="prefetch" href="/assets/js/8.a1032cf5.js"><link rel="prefetch" href="/assets/js/9.4f6fb2c7.js">
    <link rel="stylesheet" href="/assets/css/0.styles.4cf3e643.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container" data-v-1aefc0b4><div data-v-1aefc0b4><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-1aefc0b4 data-v-1aefc0b4><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-25ba6db2 data-v-1aefc0b4 data-v-1aefc0b4><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>Zelma's Blog</h3> <p class="description" data-v-25ba6db2 data-v-25ba6db2>记录，成为更好的自己！</p> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><span data-v-25ba6db2>zelma</span>
            
          <!---->
          2022
        </a></span></div></div> <div class="hide" data-v-1aefc0b4><header class="navbar" data-v-1aefc0b4><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/logo.png" alt="Zelma's Blog" class="logo"> <span class="site-name">Zelma's Blog</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  首页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/随记/" class="nav-link"><i class="undefined"></i>
  随记
</a></li><li class="dropdown-item"><!----> <a href="/categories/工具/" class="nav-link"><i class="undefined"></i>
  工具
</a></li><li class="dropdown-item"><!----> <a href="/categories/JS设计模式/" class="nav-link"><i class="undefined"></i>
  JS设计模式
</a></li><li class="dropdown-item"><!----> <a href="/categories/git使用/" class="nav-link"><i class="undefined"></i>
  git使用
</a></li><li class="dropdown-item"><!----> <a href="/categories/业务场景交互具体实现/" class="nav-link"><i class="undefined"></i>
  业务场景交互具体实现
</a></li><li class="dropdown-item"><!----> <a href="/categories/技术分享/" class="nav-link"><i class="undefined"></i>
  技术分享
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      全部文档
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/docs/theme-reco/js/prototype.html" class="nav-link"><i class="undefined"></i>
  JS相关知识
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/interactive/reactVr.html" class="nav-link"><i class="undefined"></i>
  交互具体实现
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/designPattern/preface.html" class="nav-link"><i class="undefined"></i>
  JavaScript设计模式与开发实践
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/git/gitNormal.html" aria-current="page" class="nav-link router-link-exact-active router-link-active"><i class="undefined"></i>
  Git学习
</a></li></ul></div></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-other"></i>
      工具
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/docs-tools/uploadImg.html" class="nav-link"><i class="undefined"></i>
  上传图片
</a></li></ul></div></div><div class="nav-item"><a href="/blogs/other/messageBoard.html" class="nav-link"><i class="iconfont reco-date"></i>
  留言板
</a></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-1aefc0b4></div> <aside class="sidebar" data-v-1aefc0b4><div class="personal-info-wrapper" data-v-39576ba9 data-v-1aefc0b4><img src="/avatar.png" alt="author-avatar" class="personal-img" data-v-39576ba9> <h3 class="name" data-v-39576ba9>
    zelma
  </h3> <div class="num" data-v-39576ba9><div data-v-39576ba9><h3 data-v-39576ba9>25</h3> <h6 data-v-39576ba9>文章</h6></div> <div data-v-39576ba9><h3 data-v-39576ba9>6</h3> <h6 data-v-39576ba9>标签</h6></div></div> <ul class="social-links" data-v-39576ba9><li class="social-item" data-v-39576ba9><i class="iconfont reco-juejin" style="color:#f8b26a;" data-v-39576ba9></i></li><li class="social-item" data-v-39576ba9><i class="iconfont reco-mayun" style="color:#f26d6d;" data-v-39576ba9></i></li><li class="social-item" data-v-39576ba9><i class="iconfont reco-csdn" style="color:#f47e60;" data-v-39576ba9></i></li></ul> <hr data-v-39576ba9></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  首页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/随记/" class="nav-link"><i class="undefined"></i>
  随记
</a></li><li class="dropdown-item"><!----> <a href="/categories/工具/" class="nav-link"><i class="undefined"></i>
  工具
</a></li><li class="dropdown-item"><!----> <a href="/categories/JS设计模式/" class="nav-link"><i class="undefined"></i>
  JS设计模式
</a></li><li class="dropdown-item"><!----> <a href="/categories/git使用/" class="nav-link"><i class="undefined"></i>
  git使用
</a></li><li class="dropdown-item"><!----> <a href="/categories/业务场景交互具体实现/" class="nav-link"><i class="undefined"></i>
  业务场景交互具体实现
</a></li><li class="dropdown-item"><!----> <a href="/categories/技术分享/" class="nav-link"><i class="undefined"></i>
  技术分享
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      全部文档
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/docs/theme-reco/js/prototype.html" class="nav-link"><i class="undefined"></i>
  JS相关知识
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/interactive/reactVr.html" class="nav-link"><i class="undefined"></i>
  交互具体实现
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/designPattern/preface.html" class="nav-link"><i class="undefined"></i>
  JavaScript设计模式与开发实践
</a></li><li class="dropdown-item"><!----> <a href="/docs/theme-reco/git/gitNormal.html" aria-current="page" class="nav-link router-link-exact-active router-link-active"><i class="undefined"></i>
  Git学习
</a></li></ul></div></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-other"></i>
      工具
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/docs-tools/uploadImg.html" class="nav-link"><i class="undefined"></i>
  上传图片
</a></li></ul></div></div><div class="nav-item"><a href="/blogs/other/messageBoard.html" class="nav-link"><i class="iconfont reco-date"></i>
  留言板
</a></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>JS相关知识</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>业务场景交互具体实现</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>JavaScript设计模式与开发实践</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Git学习</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/docs/theme-reco/git/gitNormal.html" aria-current="page" class="active sidebar-link">Git的常用指令</a></li></ul></section></li></ul> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-25ba6db2 data-v-1aefc0b4><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>git的常用指令</h3> <!----> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><span data-v-25ba6db2>zelma</span>
            
          <!---->
          2022
        </a></span></div></div> <div data-v-1aefc0b4><main class="page"><section><div class="page-title"><h1 class="title">git的常用指令</h1> <div data-v-f875f3fc><i class="iconfont reco-account" data-v-f875f3fc><span data-v-f875f3fc>zelma</span></i> <i class="iconfont reco-date" data-v-f875f3fc><span data-v-f875f3fc>2022/8/23</span></i> <i class="iconfont reco-eye" data-v-f875f3fc><span id="/docs/theme-reco/git/gitNormal.html" data-flag-title="Your Article Title" class="leancloud-visitors" data-v-f875f3fc><a class="leancloud-visitors-count" style="font-size:.9rem;font-weight:normal;color:#999;"></a></span></i> <i class="tags iconfont reco-tag" data-v-f875f3fc><span class="tag-item" data-v-f875f3fc>git</span></i></div></div> <div class="theme-reco-content content__default"><h1 id="前言"><a href="#前言" class="header-anchor">#</a> 前言</h1> <p>阅读廖雪峰老师的<a href="https://www.liaoxuefeng.com/wiki/896043488029600/896954117292416" target="_blank" rel="noopener noreferrer">git 教程<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，在里面一步一步跟着走，学习到了很多，自己在总结一下，方便以后使用</p> <h1 id="git-简介"><a href="#git-简介" class="header-anchor">#</a> git 简介</h1> <p>git 是目前世界上最先进的分布式版本控制系统</p> <p><strong>Git is a distributed version control system</strong></p> <p>是 Linux 作者使用 Linus 花了两周时间用 C 写了一个分布式版本控制系统。</p> <h1 id="集中式和分布式区别"><a href="#集中式和分布式区别" class="header-anchor">#</a> 集中式和分布式区别</h1> <p>先说集中式版本控制系统，版本库是集中存放在中央服务器的，而干活的时候，用的都是自己的电脑，所以要先从中央服务器取得最新的版本，然后开始干活，干完活了，再把自己的活推送给中央服务器。中央服务器就好比是一个图书馆，你要改一本书，必须先从图书馆借出来，然后回到家自己改，改完了，再放回图书馆。
集中式版本控制系统最大的毛病就是必须联网才能工作，如果在局域网内还好，带宽够大，速度够快，可如果在互联网上，遇到网速慢的话，可能提交一个 10M 的文件就需要 5 分钟，这还不得把人给憋死啊。</p> <p><img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/cd2d498359a941ca96e58192837416ee~tplv-k3u1fbpfcp-watermark.image?" alt="image.png"></p> <p>那分布式版本控制系统与集中式版本控制系统有何不同呢？首先，分布式版本控制系统根本没有“中央服务器”，每个人的电脑上都是一个完整的版本库，这样，你工作的时候，就不需要联网了，因为版本库就在你自己的电脑上。既然每个人电脑上都有一个完整的版本库，那多个人如何协作呢？比方说你在自己电脑上改了文件 A，你的同事也在他的电脑上改了文件 A，这时，你们俩之间只需把各自的修改推送给对方，就可以互相看到对方的修改了。</p> <p>和集中式版本控制系统相比，分布式版本控制系统的安全性要高很多，因为每个人电脑里都有完整的版本库，某一个人的电脑坏掉了不要紧，随便从其他人那里复制一个就可以了。而集中式版本控制系统的中央服务器要是出了问题，所有人都没法干活了。</p> <p>在实际使用分布式版本控制系统的时候，其实很少在两人之间的电脑上推送版本库的修改，因为可能你们俩不在一个局域网内，两台电脑互相访问不了，也可能今天你的同事病了，他的电脑压根没有开机。因此，分布式版本控制系统通常也有一台充当“中央服务器”的电脑，但这个服务器的作用仅仅是用来方便“交换”大家的修改，没有它大家也一样干活，只是交换修改不方便而已。</p> <p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/43131e34d97746d098b00513ed28a487~tplv-k3u1fbpfcp-watermark.image?" alt="image.png"></p> <h1 id="git-常用指令"><a href="#git-常用指令" class="header-anchor">#</a> git 常用指令</h1> <h2 id="创建版本库"><a href="#创建版本库" class="header-anchor">#</a> 创建版本库</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> init
Initialized empty Git repository <span class="token keyword">in</span> your <span class="token function">file</span> address
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="将修改添加到本地暂存区"><a href="#将修改添加到本地暂存区" class="header-anchor">#</a> 将修改添加到本地暂存区</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>// 添加指定文件
<span class="token function">git</span> <span class="token function">add</span> <span class="token operator">&lt;</span>file<span class="token operator">&gt;</span>
// 提交新文件<span class="token punctuation">(</span>new<span class="token punctuation">)</span>和被修改<span class="token punctuation">(</span>modified<span class="token punctuation">)</span>文件，不包括被删除<span class="token punctuation">(</span>deleted<span class="token punctuation">)</span>文件
<span class="token function">git</span> <span class="token function">add</span> <span class="token builtin class-name">.</span>
// 提交被修改<span class="token punctuation">(</span>modified<span class="token punctuation">)</span>和被删除<span class="token punctuation">(</span>deleted<span class="token punctuation">)</span>文件，不包括新文件<span class="token punctuation">(</span>new<span class="token punctuation">)</span>
<span class="token function">git</span> <span class="token function">add</span> -u
// 提交所有变化
<span class="token function">git</span> <span class="token function">add</span> -A
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><p>成功添加将不会有任何提示</p> <h2 id="将暂存区代码提交到当前分支"><a href="#将暂存区代码提交到当前分支" class="header-anchor">#</a> 将暂存区代码提交到当前分支</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> commit -m<span class="token string">&quot;xxx&quot;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>提交成功后会显示</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code> <span class="token number">1</span> <span class="token function">file</span> changed, <span class="token number">0</span> insertions<span class="token punctuation">(</span>+<span class="token punctuation">)</span>, <span class="token number">0</span> deletions<span class="token punctuation">(</span>-<span class="token punctuation">)</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>分别代表修改了几个文件，几行插入与几行删除</p> <h2 id="对比工作区和当前分支文件差异"><a href="#对比工作区和当前分支文件差异" class="header-anchor">#</a> 对比工作区和当前分支文件差异</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>// 没有将修改提交到暂存区时 对比文件差异
<span class="token function">git</span> <span class="token function">diff</span> <span class="token operator">&lt;</span>file<span class="token operator">&gt;</span>
// 将修改提交<span class="token punctuation">(</span>git <span class="token function">add</span> <span class="token builtin class-name">.</span><span class="token punctuation">)</span>到了暂存区时，对比文件差异
<span class="token function">git</span> <span class="token function">diff</span> HEAD -- <span class="token operator">&lt;</span>file<span class="token operator">&gt;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h2 id="查看当前分支代码状态"><a href="#查看当前分支代码状态" class="header-anchor">#</a> 查看当前分支代码状态</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> status
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="丢弃工作区修改"><a href="#丢弃工作区修改" class="header-anchor">#</a> 丢弃工作区修改</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git checkout -- &lt;file&gt;
// 或 2.3以上的git版本可以使用
git restore &lt;file&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="丢弃暂存区修改"><a href="#丢弃暂存区修改" class="header-anchor">#</a> 丢弃暂存区修改</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git reset HEAD &lt;file&gt;
// 或 2.3以上的git版本可以使用
git restore --staged &lt;file&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="版本回退"><a href="#版本回退" class="header-anchor">#</a> 版本回退</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>// <span class="token function">git</span> log拿到所有提交的日志 找到commit <span class="token function">id</span>
<span class="token function">git</span> log
// 复制commit <span class="token function">id</span> 前几位即可 git会自动寻找
<span class="token function">git</span> reset --hard <span class="token operator">&lt;</span>commit id<span class="token operator">&gt;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>直接回退到上一版本<code>HEAD^</code>,上上一个版本就是<code>HEAD^^</code>,以此内推</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>// 或者直接使用回退到上一版本
git reset --hard HEAD^
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="查看记录的所有命令"><a href="#查看记录的所有命令" class="header-anchor">#</a> 查看记录的所有命令</h2> <p>Git 提供了一个命令<code>git reflog</code>用来记录你的每一次命令,可以查看每一次<code>commit</code>、<code>reset</code>操作的<code>commit id</code>和<code>message</code></p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git reflog
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="链接远程仓库"><a href="#链接远程仓库" class="header-anchor">#</a> 链接远程仓库</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>// 第一步
<span class="token function">git</span> remote <span class="token function">add</span> origin <span class="token operator">&lt;</span>github address<span class="token operator">&gt;</span>
// 第二步把master分支推送到线上master分支并关联起来
<span class="token function">git</span> push -u origin master
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>由于远程库是空的，我们第一次推送<code>master</code>分支时，加上了<code>-u</code>参数，Git 不但会把本地的<code>master</code>分支内容推送的远程新的<code>master</code>分支，还会把本地的<code>master</code>分支和远程的<code>master</code>分支关联起来，在以后的推送或者拉取时就可以简化命令。</p> <h2 id="克隆远程仓库"><a href="#克隆远程仓库" class="header-anchor">#</a> 克隆远程仓库</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> clone <span class="token operator">&lt;</span>github address<span class="token operator">&gt;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="查看分支列表"><a href="#查看分支列表" class="header-anchor">#</a> 查看分支列表</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git branch
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="创建分支"><a href="#创建分支" class="header-anchor">#</a> 创建分支</h2> <ul><li>创建分支</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>git branch dev
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>切换分支</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>git checkout dev
// 高版本git
git switch dev
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><ul><li>创建并切换到 dev 分支</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>git checkout -b dev
//高版本git
git switch -c dev
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="合并分支"><a href="#合并分支" class="header-anchor">#</a> 合并分支</h2> <p>通常，合并分支时，如果可能，Git 会用<code>Fast forward</code>模式，但这种模式下，删除分支后，会丢掉分支信息。</p> <p>如果要强制禁用<code>Fast forward</code>模式，使用<code>--no-ff</code>模式，Git 就会在 merge 时生成一个新的 commit，这样，从分支历史上就可以看出分支信息
<strong>使用<code>Fast forward</code>方式</strong></p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git merge &lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><strong>使用<code>--no-ff</code>方式</strong>
这种方式会自动生成一次 commit 记录</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git merge --no-ff -m&quot;xxx&quot; &lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="删除分支"><a href="#删除分支" class="header-anchor">#</a> 删除分支</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>// 合并后删除
git branch -d &lt;name&gt;
// 没有合并强制删除
git branch -D &lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h2 id="日志消息"><a href="#日志消息" class="header-anchor">#</a> 日志消息</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git log
// 日志消息一行展示
git log --pretty=oneline
// 图形化日志
git log --graph --pretty=oneline --abbrev-commit
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h2 id="储存暂存区和工作区差异"><a href="#储存暂存区和工作区差异" class="header-anchor">#</a> 储存暂存区和工作区差异</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git bash
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="查看储存区储存列表"><a href="#查看储存区储存列表" class="header-anchor">#</a> 查看储存区储存列表</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git stash list
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="释放储存区"><a href="#释放储存区" class="header-anchor">#</a> 释放储存区</h2> <ol><li><p>一是用<code>git stash apply</code>恢复，但是恢复后，stash 内容并不删除，你需要用<code>git stash drop</code>来删除；</p></li> <li><p>另一种方式是用<code>git stash pop</code>，恢复的同时把 stash 内容也删了</p></li> <li><p>第三种方式是通过<code>git stash list</code>拿到当前的存储列表，通过<code>git stash apply stash@{0}</code>来切换对应储存列表</p></li></ol> <h2 id="复制-commit"><a href="#复制-commit" class="header-anchor">#</a> 复制 commit</h2> <p>在 master 分支上修复了 bug 后，我们要想一想，dev 分支是早期从 master 分支分出来的，所以，这个 bug 其实在当前 dev 分支上也存在。</p> <p>那怎么在 dev 分支上修复同样的 bug？重复操作一次，提交不就行了？</p> <p>有木有更简单的方法？</p> <p>有！</p> <p>同样的 bug，要在 dev 上修复，我们只需要把<code>4c805e2 fix bug 101</code>这个提交所做的修改“复制”到 dev 分支。注意：我们只想复制<code>4c805e2 fix bug 101</code>这个提交所做的修改，并不是把整个 master 分支 merge 过来。</p> <p>为了方便操作，Git 专门提供了一个<code>cherry-pick</code>命令，让我们能复制一个特定的提交到当前分支：</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git cherry-pick &lt;commit id&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="拉取线上仓库代码"><a href="#拉取线上仓库代码" class="header-anchor">#</a> 拉取线上仓库代码</h2> <ul><li>拉取对应分支代码</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>git pull origin &lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>拉取对应分支代码并创建本地分支</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>git checkout -b &lt;name&gt; origin/&lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="推送代码到线上仓库"><a href="#推送代码到线上仓库" class="header-anchor">#</a> 推送代码到线上仓库</h2> <div class="language- line-numbers-mode"><pre class="language-text"><code>git push origin &lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="本地分支和线上分支建立关系"><a href="#本地分支和线上分支建立关系" class="header-anchor">#</a> 本地分支和线上分支建立关系</h2> <p>建立关系后，可以直接使用<code>git pull</code>拉取线上当前分支代码，或直接使用<code>git push</code>将本地代码推送到线上分支</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git branch --set-upstream &lt;name&gt; origin/&lt;name&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="变基解决-git-的提交历史为一条干净的直线"><a href="#变基解决-git-的提交历史为一条干净的直线" class="header-anchor">#</a> 变基解决 git 的提交历史为一条干净的直线</h2> <p>rebase 操作的特点：把分叉的提交历史“整理”成一条直线，看上去更直观。缺点是本地的分叉提交已经被修改过了。</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git rebase
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="创建标签"><a href="#创建标签" class="header-anchor">#</a> 创建标签</h2> <p>默认标签是打在最新提交的 commit 上的</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git tag &lt;tagName&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>有时候，如果忘了打标签，比如，现在已经是周五了，但应该在周一打的标签没有打，怎么办？</p> <p>方法是找到历史提交的 commit id，然后打上就可以了：</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git tag &lt;tagName&gt; &lt;commit id&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>还可以创建带有说明的标签，用<code>-a</code>指定标签名，<code>-m</code>指定说明文字,若不输入<code>commit id</code>则默认打在最新提交的 commit 上</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git tag -a &lt;tagName&gt; -m&quot;xxx&quot; &lt;commit id&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="展示标签"><a href="#展示标签" class="header-anchor">#</a> 展示标签</h2> <p>展示打了标签的 commit 具体信息</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git show &lt;tagName&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>展示全部 tag</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git tag
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="推送标签到线上仓库"><a href="#推送标签到线上仓库" class="header-anchor">#</a> 推送标签到线上仓库</h2> <p>推送某个标签</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git push origin &lt;tagName&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>推送全部</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git push origin --tags
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="删除标签"><a href="#删除标签" class="header-anchor">#</a> 删除标签</h2> <p>删除本地标签</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git tag -d &lt;tagName&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>删除线上仓库标签</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git push origin :refs/tags/&lt;tagName&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h1 id="git-配置别名"><a href="#git-配置别名" class="header-anchor">#</a> git 配置别名</h1> <p>有没有经常敲错命令？比如<code>git status</code>？<code>status</code>这个单词真心不好记。</p> <p>如果敲<code>git st</code>就表示<code>git status</code>那就简单多了，当然这种偷懒的办法我们是极力赞成的。</p> <p>我们只需要敲一行命令，告诉 Git，以后<code>st</code>就表示<code>status</code>：</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>git config --global alias.st status
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>这样子配置之后以后如果要使用<code>git status</code>直接输入<code>git st</code>就可以了</p> <p>可以找到 Git 的配置文件去快速修改，在用户目录下的<code>.gitconfig</code>中</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>[user]
	name = your Name
	email = your email
[core]
	autocrlf = false
[color]
	ui = true
[alias]
	g = git
	st = status
	ch = checkout
        co = commit
        br = branch
	lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit
	mr = merge
	sw = switch
	pl = pull
	ps = push
	bs = branch --set-upstream
	a = add

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br></div></div><p>如果你想<code>git</code> 都懒得打，你可以在 bash 去输入这条语句
<code>alias g=git</code>,这样子以后可以直接使用<code>g st</code>来代替<code>git status</code></p> <h1 id="结尾"><a href="#结尾" class="header-anchor">#</a> 结尾</h1> <p>这篇文章主要是总结了廖雪峰老师 Git 教程的内容，且主要是总结各个指令如何使用，如果你对 git 还不太熟练，请你一定要看看<a href="https://www.liaoxuefeng.com/wiki/896043488029600" target="_blank" rel="noopener noreferrer">廖雪峰老师的这篇文章<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，里面从头都尾给你介绍了 git 的使用，并且会教会你在那些情况如何正确的使用 git 指令，看完之后肯定会受益匪浅。</p></div></section> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev"><a href="/docs/theme-reco/designPattern/group.html" class="prev">
            JavaScript中的组合模式
          </a></span> <!----></p></div> <div class="comments-wrapper"><!----></div> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-cb1513f6><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#创建版本库" class="sidebar-link reco-side-创建版本库" data-v-cb1513f6>创建版本库</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#将修改添加到本地暂存区" class="sidebar-link reco-side-将修改添加到本地暂存区" data-v-cb1513f6>将修改添加到本地暂存区</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#将暂存区代码提交到当前分支" class="sidebar-link reco-side-将暂存区代码提交到当前分支" data-v-cb1513f6>将暂存区代码提交到当前分支</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#对比工作区和当前分支文件差异" class="sidebar-link reco-side-对比工作区和当前分支文件差异" data-v-cb1513f6>对比工作区和当前分支文件差异</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#查看当前分支代码状态" class="sidebar-link reco-side-查看当前分支代码状态" data-v-cb1513f6>查看当前分支代码状态</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#丢弃工作区修改" class="sidebar-link reco-side-丢弃工作区修改" data-v-cb1513f6>丢弃工作区修改</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#丢弃暂存区修改" class="sidebar-link reco-side-丢弃暂存区修改" data-v-cb1513f6>丢弃暂存区修改</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#版本回退" class="sidebar-link reco-side-版本回退" data-v-cb1513f6>版本回退</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#查看记录的所有命令" class="sidebar-link reco-side-查看记录的所有命令" data-v-cb1513f6>查看记录的所有命令</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#链接远程仓库" class="sidebar-link reco-side-链接远程仓库" data-v-cb1513f6>链接远程仓库</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#克隆远程仓库" class="sidebar-link reco-side-克隆远程仓库" data-v-cb1513f6>克隆远程仓库</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#查看分支列表" class="sidebar-link reco-side-查看分支列表" data-v-cb1513f6>查看分支列表</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#创建分支" class="sidebar-link reco-side-创建分支" data-v-cb1513f6>创建分支</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#合并分支" class="sidebar-link reco-side-合并分支" data-v-cb1513f6>合并分支</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#删除分支" class="sidebar-link reco-side-删除分支" data-v-cb1513f6>删除分支</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#日志消息" class="sidebar-link reco-side-日志消息" data-v-cb1513f6>日志消息</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#储存暂存区和工作区差异" class="sidebar-link reco-side-储存暂存区和工作区差异" data-v-cb1513f6>储存暂存区和工作区差异</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#查看储存区储存列表" class="sidebar-link reco-side-查看储存区储存列表" data-v-cb1513f6>查看储存区储存列表</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#释放储存区" class="sidebar-link reco-side-释放储存区" data-v-cb1513f6>释放储存区</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#复制-commit" class="sidebar-link reco-side-复制-commit" data-v-cb1513f6>复制 commit</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#拉取线上仓库代码" class="sidebar-link reco-side-拉取线上仓库代码" data-v-cb1513f6>拉取线上仓库代码</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#推送代码到线上仓库" class="sidebar-link reco-side-推送代码到线上仓库" data-v-cb1513f6>推送代码到线上仓库</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#本地分支和线上分支建立关系" class="sidebar-link reco-side-本地分支和线上分支建立关系" data-v-cb1513f6>本地分支和线上分支建立关系</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#变基解决-git-的提交历史为一条干净的直线" class="sidebar-link reco-side-变基解决-git-的提交历史为一条干净的直线" data-v-cb1513f6>变基解决 git 的提交历史为一条干净的直线</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#创建标签" class="sidebar-link reco-side-创建标签" data-v-cb1513f6>创建标签</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#展示标签" class="sidebar-link reco-side-展示标签" data-v-cb1513f6>展示标签</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#推送标签到线上仓库" class="sidebar-link reco-side-推送标签到线上仓库" data-v-cb1513f6>推送标签到线上仓库</a></li><li class="level-2" data-v-cb1513f6><a href="/docs/theme-reco/git/gitNormal.html#删除标签" class="sidebar-link reco-side-删除标签" data-v-cb1513f6>删除标签</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div><canvas id="vuepress-canvas-cursor"></canvas><div class="kanbanniang" data-v-5775ee02><div class="banniang-container" style="display:;" data-v-5775ee02><div class="messageBox" style="right:68px;bottom:290px;display:none;" data-v-5775ee02>
      欢迎来到Zelma的博客
    </div> <div class="operation" style="right:90px;bottom:40px;display:;" data-v-5775ee02><i class="kbnfont kbn-ban-home ban-home" data-v-5775ee02></i> <i class="kbnfont kbn-ban-message message" data-v-5775ee02></i> <i class="kbnfont kbn-ban-close close" data-v-5775ee02></i> <a target="_blank" href="https://vuepress-theme-reco.recoluan.com/views/plugins/kanbanniang.html" data-v-5775ee02><i class="kbnfont kbn-ban-info info" data-v-5775ee02></i></a> <i class="kbnfont kbn-ban-theme skin" style="display:;" data-v-5775ee02></i></div> <canvas id="banniang" width="250" height="320" class="live2d" style="right:90px;bottom:-20px;opacity:0.9;" data-v-5775ee02></canvas></div> <div class="showBanNiang" style="display:none;" data-v-5775ee02>
    看板娘
  </div></div><!----><div class="RibbonAnimation"></div></div></div>
    <script src="/assets/js/app.6bff9ace.js" defer></script><script src="/assets/js/4.4f19eb35.js" defer></script><script src="/assets/js/1.085d100d.js" defer></script><script src="/assets/js/27.d5e7e0d7.js" defer></script>
  </body>
</html>
